import request from '@/utils/request'

// 查询账户入账申请列表
export function listApplyRecord(query) {
  return request({
    url: '/account/applyRecord/list',
    method: 'get',
    params: query
  })
}


// 查询账户入账申请详细
export function baseInfoExtData() {
  return request({
    url: '/account/applyRecord/extData',
    method: 'get'
  })
}

// 查询账户入账申请详细
export function getApplyRecord(id) {
  return request({
    url: '/account/applyRecord/' + id,
    method: 'get'
  })
}

// 新增账户入账申请
export function addApplyRecord(data) {
  return request({
    url: '/account/applyRecord',
    method: 'post',
    data: data
  })
}

// 修改账户入账申请
export function updateApplyRecord(data) {
  return request({
    url: '/account/applyRecord',
    method: 'put',
    data: data
  })
}

// 删除账户入账申请
export function delApplyRecord(id) {
  return request({
    url: '/account/applyRecord/' + id,
    method: 'delete'
  })
}


// 获取操作信息
export function getActionAndItemAccountData(accountType) {
  return request({
    url: '/account/applyRecord/getActionAndItemAccountData/' + accountType,
    method: 'post'
  })
}


// 入账申请
export function applyBill(id) {
  return request({
    url: '/account/applyRecord/applyBill/' + id,
    method: 'post'
  })
}

// 驳回
export function refuseBill(id, type) {
  return request({
    url: '/account/applyRecord/refuseBill/' + id,
    method: 'post'
  })
}

// 入账
export function enterBill(id) {
  return request({
    url: '/account/applyRecord/enterBill/' + id,
    method: 'post'
  })
}